<?php

namespace app\model\platform;

use app\BaseModel;
use app\model\UserModel;
use think\model\relation\BelongsTo;

/**
 * 区域-推送消息
 */
class PlatformPushMessageModel extends BaseModel
{
    protected $name = 'platform_push_message';

    /**
     * 用户
     * @return BelongsTo
     */
    public function user(): BelongsTo
    {
        return $this->belongsTo(UserModel::class,'uid')->bind([
            'user_name' => 'name',
            'user_level' => 'level'
        ]);
    }

}